/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.dusin.weijiwufang.service.impl;

import java.sql.Timestamp;
import java.util.List;
import org.dusin.weijiwufang.bo.StatusBean;
import org.dusin.weijiwufang.dao.StatusDao;
import org.dusin.weijiwufang.service.StatusService;


/**
 *
 * @author dusin
 */
public class StatusServiceImpl implements StatusService {

    private StatusDao statusDao;

    public StatusServiceImpl(StatusDao statusDao) {
        this.statusDao = statusDao;
    }    

    public void setStatusDao(StatusDao statusDao) {
        this.statusDao = statusDao;
    }

    @Override
    public List<StatusBean> findAll() {
        return statusDao.findAll();
    }

    @Override
    public boolean addStatus(StatusBean status) {
        return statusDao.doCreate(status);
    }

    @Override
    public boolean updateStatus(StatusBean status) {
        return statusDao.doUpdate(status);
    }

    @Override
    public boolean deleteStatus(long id) {
        return statusDao.doDeleteById(id);
    }
}
